<template>
  <div>
    {{ show }}
    <button @click="change">修改value</button>
  </div>
</template>

<script>
export default {
  props: {
    show: String,
  },
  data() {
    return {};
  },
  model: {
    prop: "show",
    event: "changeValue",
  },
  //把 value和input 变成 show和changeValue
  methods: {
    change() {
      this.$emit("changeValue", "world hello");
    },
  },
  created() {},
  mounted() {},
  components: {},
  computed: {},
  watch: {},
};
</script>

<style lang="scss" scoped></style>
